#range语句  
#功能是获得一个数字序列
#语法1：range(num) 生成0-num的数字，不包括num

# for x in range(10):
#     print(x)


# #语法2：range(num1, num2) 生成num1 到 num2的数字，不包括num2
# for x in range(5, 10):
#     print(x)


#语法3：range(num1, num2, step) 每隔step生成一个数字，范围是num1到num2，不包括num2
# for x in range(5, 10, 2):
#     print(x)

#记录1-100之间的偶数值
# count = 0
# i = 0
# for i in range(1, 101):
#     if i % 2 == 0:
#         count += 1

# print(f"1-100 之间一共有{count}个偶数")
# print(i) #一般来说，在前面没有定义i而i只存在于for循环中，那么在for循环外面调用i不符合规范
#             #解决方法是在前面定义一个i
    
#打印9*9乘法表
# for i in range(1, 10):
#     for j in range(1, i + 1):
#         print(f"{j} * {i} = {j * i}\t", end = '')
#     print()

# import random
# total_salary = 10000
# for x in range(1, 21):
#     ran_num = random.randint(1, 10)
#     if ran_num <= 5:
#         print(f"员工{x}绩效分不足，领不到工资")
#         continue
#     else:
#         print(f"员工{x}领到了1000元工资， 还剩{total_salary - 1000}元")
#         total_salary = total_salary - 1000
#     if total_salary == 0:
#         print("没有钱发工资了")
#         break

# def say_hi():
#     print("hi, I am Feng, I am studaying Python")

# say_hi()


# def add(x, y):
#     return x + y

# # print(add(19, 22))
# print(f"answer is {add(19.2, 22):.2f}")


# def inspect_tmp(tmp):
#     if tmp >37.5:
#         print("你的体温超过37.5， 需要隔离")
#     else:
#         print("符合标准，请进")

# temperature = float(input("请输入你的体温："))
# inspect_tmp(temperature)


#返回值为空的测试
# def None_return():
  
#     print(22)
# print(f"返回值是：{None_return()}")
# print(f"返回值类型是：{type(None_return())}")

# num = 100

# def Fix_num1():
#     print(num)

# def Fix_num2():
#     num = 1000
#     print(num)

# Fix_num1()
# Fix_num2()
# print(num)


# num = 100

# def Fix_num1():
#     print(num)

# def Fix_num2():
#     global num #global关键字用于在函数内部声明全局变量，用于修改全局变量
#     num = 1000
#     print(num)

# Fix_num1()
# Fix_num2()
# print(num)

money = 5000000
name = input("Please enter your name：")

#check money 
def check(money):
    print(f"there are {money} yuan")

#in money
def in_money(num_money):
    print(f"存入{num_money}元")
    check(money + num_money)

#out_money
def out_money(num_money):
    print(f"取出{num_money}元")
    check(money - num_money)


#menu
def menu():
    print("---------菜单---------")
    print("1.check money  2.in money  3.out money")
    print("----------------------")

while 1:
    menu()
    option = int(input("输入选项："))
    if option == 1:
        check(money)
    elif option == 2:
        in_money(int(input("请输入你要存入的金额：")))
    elif option == 3:
        out_money(int(input("请输入你要取出的金额：")))
    else:
        break

